﻿<phone:PhoneApplicationPage x:Class="EmperialApps.WeatherSpark.AdvancedSettingsPage"
                            xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                            xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                            xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                            xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
                            xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
                            xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
                            xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
                            FontFamily="{StaticResource PhoneFontFamilyNormal}"
                            FontSize="{StaticResource PhoneFontSizeNormal}"
                            Foreground="{StaticResource PhoneForegroundBrush}"
                            Orientation="Portrait"
                            SupportedOrientations="Portrait"
                            mc:Ignorable="d"
                            d:DesignHeight="768"
                            d:DesignWidth="480"
                            shell:SystemTray.IsVisible="True">

    <Grid x:Name="LayoutRoot"
          Background="Transparent">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        <Grid.Resources>
            <DataTemplate x:Key="ColorFullTemplate">
                <StackPanel Orientation="Horizontal">
                    <Rectangle Margin="6"
                               Width="72"
                               Height="72"
                               VerticalAlignment="Center"
                               Fill="{Binding Brush, Mode=OneWay}" />
                    <TextBlock Style="{StaticResource PhoneTextLargeStyle}"
                               VerticalAlignment="Center"
                               Text="{Binding Name, Mode=OneWay}" />
                </StackPanel>
            </DataTemplate>

            <DataTemplate x:Key="ColorItemTemplate">
                <StackPanel Orientation="Horizontal">
                    <Rectangle Margin="6,3"
                               Width="24"
                               Height="24"
                               VerticalAlignment="Center"
                               Fill="{Binding Brush, Mode=OneWay}" />
                    <TextBlock Margin="6,3"
                               VerticalAlignment="Center"
                               Text="{Binding Name, Mode=OneWay}" />
                </StackPanel>
            </DataTemplate>
        </Grid.Resources>

        <StackPanel Grid.Row="0"
                    Margin="12,17,0,28">
            <TextBlock Style="{StaticResource PhoneTextNormalStyle}"
                       Text="WᴇᴀᴛʜᴇʀSᴘᴀʀᴋ" />
            <TextBlock Style="{StaticResource PhoneTextTitle1Style}"
                       FontSize="50"
                       Text="{Binding Mode=OneTime, Source={StaticResource Localized}, Path=Strings.AdvancedSettingsPage_header}"
                       Margin="9,-7,0,0" />
        </StackPanel>

        <Rectangle x:Name="TileProgress"
                   Style="{StaticResource TileProgressIndicator}">
            <Rectangle.Clip>
                <PathGeometry />
            </Rectangle.Clip>
        </Rectangle>

        <StackPanel x:Name="ContentPanel"
                    Grid.Row="1"
                    Margin="{StaticResource PhoneHorizontalMargin}">
            <TextBlock Style="{StaticResource SettingDescription}"
                       Margin="0"
                       Text="{Binding Mode=OneTime, Source={StaticResource Localized}, Path=Strings.AdvancedSettingsPage_Current_header}" />
            <CheckBox x:Name="EnableWideTileButton"
                      Margin="0,-3,0,-9"
                      Content="{Binding Mode=OneTime, Source={StaticResource Localized}, Path=Strings.AdvancedSettingsPage_Current_EnableWideTile}"
                      Click="OnEnableWideTileButtonClicked" />

            <toolkit:Separator Margin="{StaticResource SeparatorMargin}"
                               Background="{StaticResource PhoneContrastBackgroundBrush}" />

            <TextBlock Style="{StaticResource SettingDescription}"
                       Text="{Binding Mode=OneTime, Source={StaticResource Localized}, Path=Strings.AdvancedSettingsPage_TileBackground_header}" />
            <toolkit:ListPicker x:Name="TileBackground"
                                Background="{StaticResource TransparentBrush}"
                                ExpansionMode="FullScreenOnly"
                                Foreground="{StaticResource PhoneForegroundBrush}"
                                FullModeHeader="Tile background"
                                FullModeItemTemplate="{StaticResource ColorFullTemplate}"
                                ItemTemplate="{StaticResource ColorItemTemplate}" />
            <TextBlock x:Name="TileBackgroundChangeText"
                       Style="{StaticResource PhoneTextSubtleStyle}"
                       Text="{Binding Mode=OneTime, Source={StaticResource Localized}, Path=Strings.AdvancedSettingsPage_TileBackground_change}"
                       TextWrapping="Wrap" />
            <Grid Height="173"
                  Margin="{StaticResource PhoneVerticalMargin}"
                  HorizontalAlignment="Center"
                  Background="{StaticResource PhoneAccentBrush}">
                <Viewbox x:Name="TilePreview" />
            </Grid>
        </StackPanel>
    </Grid>
</phone:PhoneApplicationPage>
